<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>authorize to access</title>
    <link rel="stylesheet" href="../static/assets/bootstrap/css/bootstrap.min.css"
          th:href="@{/assets/bootstrap/css/bootstrap.min.css}"/>
</head>

<body>

<div class="container mt-5">
    <h2>访问授权确认?</h2>
    <p>
        “<span th:text="${applicationName}"/>” 试图获取您的以下信息：
    </p>

    <form id="confirmationForm" name="confirmationForm"
          action="/oauth/authorize" method="post">
        <input name="user_oauth_approval" value="true" type="hidden"/>
        <input name="state" th:value="${state}" type="hidden"/>
        <input name="client_id" th:value="${client_id}" type="hidden"/>
        <input name="redirect_uri" th:value="${redirect_uri}" type="hidden"/>
        <input name="scope" th:value="${scope}" type="hidden"/>
        <ul class="list-unstyled">
            <li th:each="scope,scopeIter:${scopeMap}">
                <span class="bg-danger"><span th:text="${scope.value}"></span>!</span>
            </li>
        </ul>
        <button class="btn btn-primary btn-sm" type="submit">同意授权</button>
        <a class="btn btn-danger btn-sm" th:href="@{${from}}">拒绝并返回</a>
    </form>

</div>
<script src="../static/assets/jquery.min.js"
        th:src="@{/assets/jquery.min.js}"></script>
<script src="../static/assets/bootstrap/js/bootstrap.min.js"
        th:src="@{/assets/bootstrap/js/bootstrap.min.js}"></script>
<script th:src="@{/assets/localforage.min.js}" src="../static/assets/localforage.min.js"></script>
</body>
</html>
